<script setup>
import { ElMessage } from "element-plus";

const open1 = () => {
  ElMessage("this is a message.");
};
const open2 = () => {
  ElMessage({
    message: "Congrats, this is a success message.",
    type: "success"
  });
};
const open3 = () => {
  ElMessage({
    message: "Warning, this is a warning message.",
    type: "warning"
  });
};
const open4 = () => {
  ElMessage.error("Oops, this is a error message.");
};
</script>
<template>
  <div>
    <el-card class="box-card" shadow="never">
      <el-button :plain="true" @click="open2">success</el-button>
      <el-button :plain="true" @click="open3">warning</el-button>
      <el-button :plain="true" @click="open1">message</el-button>
      <el-button :plain="true" @click="open4">error</el-button>
    </el-card>
  </div>
</template>

<style lang="scss" scoped>
.box-card {
  height: calc(100vh - 78px);
  min-height: 660px;

  :deep(.el-card__body) {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
}
</style>
